package com.wordplat.quickstart.xutils.image;

import ohos.media.image.PixelMap;

/**
 * ReusableBitmapDrawable
 *
 * @since 2021-06-21
 */
final class ReusableBitmapDrawable extends PixelMap implements ReusableDrawable {
    private MemCacheKey key;

    /**
     * ReusableBitmapDrawable
     *
     * @param nativeImagePixelMap
     * @param nativeAllocBytes
     */
    protected ReusableBitmapDrawable(long nativeImagePixelMap, long nativeAllocBytes) {
        super(nativeImagePixelMap, nativeAllocBytes);
    }

    /**
     * getMemCacheKey
     *
     * @return MemCacheKey
     */
    @Override
    public MemCacheKey getMemCacheKey() {
        return key;
    }

    /**
     * setMemCacheKey
     *
     * @param key
     */
    @Override
    public void setMemCacheKey(MemCacheKey key) {
        this.key = key;
    }
}
